home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Programming / gcc-2.95.3-3 / info / gcc.info-17 < prev    next >
Encoding:
GNU Info File  |  2001-07-15  |  49.1 KB  |  1,086 lines

  1. This is Info file gcc.info, produced by Makeinfo version 1.68 from the
  2. input file ./gcc.texi.
  3.  
  4. INFO-DIR-SECTION Programming
  5. START-INFO-DIR-ENTRY
  6. * gcc: (gcc).                  The GNU Compiler Collection.
  7. END-INFO-DIR-ENTRY
  8.    This file documents the use and the internals of the GNU compiler.
  9.  
  10.    Published by the Free Software Foundation 59 Temple Place - Suite 330
  11. Boston, MA 02111-1307 USA
  12.  
  13.    Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
  14. 1999, 2000 Free Software Foundation, Inc.
  15.  
  16.    Permission is granted to make and distribute verbatim copies of this
  17. manual provided the copyright notice and this permission notice are
  18. preserved on all copies.
  19.  
  20.    Permission is granted to copy and distribute modified versions of
  21. this manual under the conditions for verbatim copying, provided also
  22. that the sections entitled "GNU General Public License" and "Funding
  23. for Free Software" are included exactly as in the original, and
  24. provided that the entire resulting derived work is distributed under
  25. the terms of a permission notice identical to this one.
  26.  
  27.    Permission is granted to copy and distribute translations of this
  28. manual into another language, under the above conditions for modified
  29. versions, except that the sections entitled "GNU General Public
  30. License" and "Funding for Free Software", and this permission notice,
  31. may be included in translations approved by the Free Software Foundation
  32. instead of in the original English.
  33.  
  34. 
  35. File: gcc.info,  Node: RTL Declarations,  Next: Side Effects,  Prev: Conversions,  Up: RTL
  36.  
  37. Declarations
  38. ============
  39.  
  40.    Declaration expression codes do not represent arithmetic operations
  41. but rather state assertions about their operands.
  42.  
  43. `(strict_low_part (subreg:M (reg:N R) 0))'
  44.      This expression code is used in only one context: as the
  45.      destination operand of a `set' expression.  In addition, the
  46.      operand of this expression must be a non-paradoxical `subreg'
  47.      expression.
  48.  
  49.      The presence of `strict_low_part' says that the part of the
  50.      register which is meaningful in mode N, but is not part of mode M,
  51.      is not to be altered.  Normally, an assignment to such a subreg is
  52.      allowed to have undefined effects on the rest of the register when
  53.      M is less than a word.
  54.  
  55. 
  56. File: gcc.info,  Node: Side Effects,  Next: Incdec,  Prev: RTL Declarations,  Up: RTL
  57.  
  58. Side Effect Expressions
  59. =======================
  60.  
  61.    The expression codes described so far represent values, not actions.
  62. But machine instructions never produce values; they are meaningful only
  63. for their side effects on the state of the machine.  Special expression
  64. codes are used to represent side effects.
  65.  
  66.    The body of an instruction is always one of these side effect codes;
  67. the codes described above, which represent values, appear only as the
  68. operands of these.
  69.  
  70. `(set LVAL X)'
  71.      Represents the action of storing the value of X into the place
  72.      represented by LVAL.  LVAL must be an expression representing a
  73.      place that can be stored in: `reg' (or `subreg' or
  74.      `strict_low_part'), `mem', `pc' or `cc0'.
  75.  
  76.      If LVAL is a `reg', `subreg' or `mem', it has a machine mode; then
  77.      X must be valid for that mode.
  78.  
  79.      If LVAL is a `reg' whose machine mode is less than the full width
  80.      of the register, then it means that the part of the register
  81.      specified by the machine mode is given the specified value and the
  82.      rest of the register receives an undefined value.  Likewise, if
  83.      LVAL is a `subreg' whose machine mode is narrower than the mode of
  84.      the register, the rest of the register can be changed in an
  85.      undefined way.
  86.  
  87.      If LVAL is a `strict_low_part' of a `subreg', then the part of the
  88.      register specified by the machine mode of the `subreg' is given
  89.      the value X and the rest of the register is not changed.
  90.  
  91.      If LVAL is `(cc0)', it has no machine mode, and X may be either a
  92.      `compare' expression or a value that may have any mode.  The
  93.      latter case represents a "test" instruction.  The expression `(set
  94.      (cc0) (reg:M N))' is equivalent to `(set (cc0) (compare (reg:M N)
  95.      (const_int 0)))'.  Use the former expression to save space during
  96.      the compilation.
  97.  
  98.      If LVAL is `(pc)', we have a jump instruction, and the
  99.      possibilities for X are very limited.  It may be a `label_ref'
  100.      expression (unconditional jump).  It may be an `if_then_else'
  101.      (conditional jump), in which case either the second or the third
  102.      operand must be `(pc)' (for the case which does not jump) and the
  103.      other of the two must be a `label_ref' (for the case which does
  104.      jump).  X may also be a `mem' or `(plus:SI (pc) Y)', where Y may
  105.      be a `reg' or a `mem'; these unusual patterns are used to
  106.      represent jumps through branch tables.
  107.  
  108.      If LVAL is neither `(cc0)' nor `(pc)', the mode of LVAL must not
  109.      be `VOIDmode' and the mode of X must be valid for the mode of LVAL.
  110.  
  111.      LVAL is customarily accessed with the `SET_DEST' macro and X with
  112.      the `SET_SRC' macro.
  113.  
  114. `(return)'
  115.      As the sole expression in a pattern, represents a return from the
  116.      current function, on machines where this can be done with one
  117.      instruction, such as Vaxes.  On machines where a multi-instruction
  118.      "epilogue" must be executed in order to return from the function,
  119.      returning is done by jumping to a label which precedes the
  120.      epilogue, and the `return' expression code is never used.
  121.  
  122.      Inside an `if_then_else' expression, represents the value to be
  123.      placed in `pc' to return to the caller.
  124.  
  125.      Note that an insn pattern of `(return)' is logically equivalent to
  126.      `(set (pc) (return))', but the latter form is never used.
  127.  
  128. `(call FUNCTION NARGS)'
  129.      Represents a function call.  FUNCTION is a `mem' expression whose
  130.      address is the address of the function to be called.  NARGS is an
  131.      expression which can be used for two purposes: on some machines it
  132.      represents the number of bytes of stack argument; on others, it
  133.      represents the number of argument registers.
  134.  
  135.      Each machine has a standard machine mode which FUNCTION must have.
  136.      The machine description defines macro `FUNCTION_MODE' to expand
  137.      into the requisite mode name.  The purpose of this mode is to
  138.      specify what kind of addressing is allowed, on machines where the
  139.      allowed kinds of addressing depend on the machine mode being
  140.      addressed.
  141.  
  142. `(clobber X)'
  143.      Represents the storing or possible storing of an unpredictable,
  144.      undescribed value into X, which must be a `reg', `scratch' or
  145.      `mem' expression.
  146.  
  147.      One place this is used is in string instructions that store
  148.      standard values into particular hard registers.  It may not be
  149.      worth the trouble to describe the values that are stored, but it
  150.      is essential to inform the compiler that the registers will be
  151.      altered, lest it attempt to keep data in them across the string
  152.      instruction.
  153.  
  154.      If X is `(mem:BLK (const_int 0))', it means that all memory
  155.      locations must be presumed clobbered.
  156.  
  157.      Note that the machine description classifies certain hard
  158.      registers as "call-clobbered".  All function call instructions are
  159.      assumed by default to clobber these registers, so there is no need
  160.      to use `clobber' expressions to indicate this fact.  Also, each
  161.      function call is assumed to have the potential to alter any memory
  162.      location, unless the function is declared `const'.
  163.  
  164.      If the last group of expressions in a `parallel' are each a
  165.      `clobber' expression whose arguments are `reg' or `match_scratch'
  166.      (*note RTL Template::.) expressions, the combiner phase can add
  167.      the appropriate `clobber' expressions to an insn it has
  168.      constructed when doing so will cause a pattern to be matched.
  169.  
  170.      This feature can be used, for example, on a machine that whose
  171.      multiply and add instructions don't use an MQ register but which
  172.      has an add-accumulate instruction that does clobber the MQ
  173.      register.  Similarly, a combined instruction might require a
  174.      temporary register while the constituent instructions might not.
  175.  
  176.      When a `clobber' expression for a register appears inside a
  177.      `parallel' with other side effects, the register allocator
  178.      guarantees that the register is unoccupied both before and after
  179.      that insn.  However, the reload phase may allocate a register used
  180.      for one of the inputs unless the `&' constraint is specified for
  181.      the selected alternative (*note Modifiers::.).  You can clobber
  182.      either a specific hard register, a pseudo register, or a `scratch'
  183.      expression; in the latter two cases, GNU CC will allocate a hard
  184.      register that is available there for use as a temporary.
  185.  
  186.      For instructions that require a temporary register, you should use
  187.      `scratch' instead of a pseudo-register because this will allow the
  188.      combiner phase to add the `clobber' when required.  You do this by
  189.      coding (`clobber' (`match_scratch' ...)).  If you do clobber a
  190.      pseudo register, use one which appears nowhere else--generate a
  191.      new one each time.  Otherwise, you may confuse CSE.
  192.  
  193.      There is one other known use for clobbering a pseudo register in a
  194.      `parallel': when one of the input operands of the insn is also
  195.      clobbered by the insn.  In this case, using the same pseudo
  196.      register in the clobber and elsewhere in the insn produces the
  197.      expected results.
  198.  
  199. `(use X)'
  200.      Represents the use of the value of X.  It indicates that the value
  201.      in X at this point in the program is needed, even though it may
  202.      not be apparent why this is so.  Therefore, the compiler will not
  203.      attempt to delete previous instructions whose only effect is to
  204.      store a value in X.  X must be a `reg' expression.
  205.  
  206.      During the reload phase, an insn that has a `use' as pattern can
  207.      carry a reg_equal note.  These `use' insns will be deleted before
  208.      the reload phase exits.
  209.  
  210.      During the delayed branch scheduling phase, X may be an insn.
  211.      This indicates that X previously was located at this place in the
  212.      code and its data dependencies need to be taken into account.
  213.      These `use' insns will be deleted before the delayed branch
  214.      scheduling phase exits.
  215.  
  216. `(parallel [X0 X1 ...])'
  217.      Represents several side effects performed in parallel.  The square
  218.      brackets stand for a vector; the operand of `parallel' is a vector
  219.      of expressions.  X0, X1 and so on are individual side effect
  220.      expressions--expressions of code `set', `call', `return',
  221.      `clobber' or `use'.
  222.  
  223.      "In parallel" means that first all the values used in the
  224.      individual side-effects are computed, and second all the actual
  225.      side-effects are performed.  For example,
  226.  
  227.           (parallel [(set (reg:SI 1) (mem:SI (reg:SI 1)))
  228.                      (set (mem:SI (reg:SI 1)) (reg:SI 1))])
  229.  
  230.      says unambiguously that the values of hard register 1 and the
  231.      memory location addressed by it are interchanged.  In both places
  232.      where `(reg:SI 1)' appears as a memory address it refers to the
  233.      value in register 1 *before* the execution of the insn.
  234.  
  235.      It follows that it is *incorrect* to use `parallel' and expect the
  236.      result of one `set' to be available for the next one.  For
  237.      example, people sometimes attempt to represent a jump-if-zero
  238.      instruction this way:
  239.  
  240.           (parallel [(set (cc0) (reg:SI 34))
  241.                      (set (pc) (if_then_else
  242.                                   (eq (cc0) (const_int 0))
  243.                                   (label_ref ...)
  244.                                   (pc)))])
  245.  
  246.      But this is incorrect, because it says that the jump condition
  247.      depends on the condition code value *before* this instruction, not
  248.      on the new value that is set by this instruction.
  249.  
  250.      Peephole optimization, which takes place together with final
  251.      assembly code output, can produce insns whose patterns consist of
  252.      a `parallel' whose elements are the operands needed to output the
  253.      resulting assembler code--often `reg', `mem' or constant
  254.      expressions.  This would not be well-formed RTL at any other stage
  255.      in compilation, but it is ok then because no further optimization
  256.      remains to be done.  However, the definition of the macro
  257.      `NOTICE_UPDATE_CC', if any, must deal with such insns if you
  258.      define any peephole optimizations.
  259.  
  260. `(sequence [INSNS ...])'
  261.      Represents a sequence of insns.  Each of the INSNS that appears in
  262.      the vector is suitable for appearing in the chain of insns, so it
  263.      must be an `insn', `jump_insn', `call_insn', `code_label',
  264.      `barrier' or `note'.
  265.  
  266.      A `sequence' RTX is never placed in an actual insn during RTL
  267.      generation.  It represents the sequence of insns that result from a
  268.      `define_expand' *before* those insns are passed to `emit_insn' to
  269.      insert them in the chain of insns.  When actually inserted, the
  270.      individual sub-insns are separated out and the `sequence' is
  271.      forgotten.
  272.  
  273.      After delay-slot scheduling is completed, an insn and all the
  274.      insns that reside in its delay slots are grouped together into a
  275.      `sequence'.  The insn requiring the delay slot is the first insn
  276.      in the vector; subsequent insns are to be placed in the delay slot.
  277.  
  278.      `INSN_ANNULLED_BRANCH_P' is set on an insn in a delay slot to
  279.      indicate that a branch insn should be used that will conditionally
  280.      annul the effect of the insns in the delay slots.  In such a case,
  281.      `INSN_FROM_TARGET_P' indicates that the insn is from the target of
  282.      the branch and should be executed only if the branch is taken;
  283.      otherwise the insn should be executed only if the branch is not
  284.      taken.  *Note Delay Slots::.
  285.  
  286.    These expression codes appear in place of a side effect, as the body
  287. of an insn, though strictly speaking they do not always describe side
  288. effects as such:
  289.  
  290. `(asm_input S)'
  291.      Represents literal assembler code as described by the string S.
  292.  
  293. `(unspec [OPERANDS ...] INDEX)'
  294. `(unspec_volatile [OPERANDS ...] INDEX)'
  295.      Represents a machine-specific operation on OPERANDS.  INDEX
  296.      selects between multiple machine-specific operations.
  297.      `unspec_volatile' is used for volatile operations and operations
  298.      that may trap; `unspec' is used for other operations.
  299.  
  300.      These codes may appear inside a `pattern' of an insn, inside a
  301.      `parallel', or inside an expression.
  302.  
  303. `(addr_vec:M [LR0 LR1 ...])'
  304.      Represents a table of jump addresses.  The vector elements LR0,
  305.      etc., are `label_ref' expressions.  The mode M specifies how much
  306.      space is given to each address; normally M would be `Pmode'.
  307.  
  308. `(addr_diff_vec:M BASE [LR0 LR1 ...] MIN MAX FLAGS)'
  309.      Represents a table of jump addresses expressed as offsets from
  310.      BASE.  The vector elements LR0, etc., are `label_ref' expressions
  311.      and so is BASE.  The mode M specifies how much space is given to
  312.      each address-difference.  MIN and MAX are set up by branch
  313.      shortening and hold a label with a minimum and a maximum address,
  314.      respectively.  FLAGS indicates the relative position of BASE, MIN
  315.      and MAX to the cointaining insn and of MIN and MAX to BASE.  See
  316.      rtl.def for details.
  317.  
  318. 
  319. File: gcc.info,  Node: Incdec,  Next: Assembler,  Prev: Side Effects,  Up: RTL
  320.  
  321. Embedded Side-Effects on Addresses
  322. ==================================
  323.  
  324.    Six special side-effect expression codes appear as memory addresses.
  325.  
  326. `(pre_dec:M X)'
  327.      Represents the side effect of decrementing X by a standard amount
  328.      and represents also the value that X has after being decremented.
  329.      X must be a `reg' or `mem', but most machines allow only a `reg'.
  330.      M must be the machine mode for pointers on the machine in use.
  331.      The amount X is decremented by is the length in bytes of the
  332.      machine mode of the containing memory reference of which this
  333.      expression serves as the address.  Here is an example of its use:
  334.  
  335.           (mem:DF (pre_dec:SI (reg:SI 39)))
  336.  
  337.      This says to decrement pseudo register 39 by the length of a
  338.      `DFmode' value and use the result to address a `DFmode' value.
  339.  
  340. `(pre_inc:M X)'
  341.      Similar, but specifies incrementing X instead of decrementing it.
  342.  
  343. `(post_dec:M X)'
  344.      Represents the same side effect as `pre_dec' but a different
  345.      value.  The value represented here is the value X has before being
  346.      decremented.
  347.  
  348. `(post_inc:M X)'
  349.      Similar, but specifies incrementing X instead of decrementing it.
  350.  
  351. `(post_modify:M X Y)'
  352.      Represents the side effect of setting X to Y and represents X
  353.      before X is modified.  X must be a `reg' or `mem', but most
  354.      machines allow only a `reg'.  M must be the machine mode for
  355.      pointers on the machine in use.  The amount X is decremented by is
  356.      the length in bytes of the machine mode of the containing memory
  357.      reference of which this expression serves as the address.  Note
  358.      that this is not currently implemented.
  359.  
  360.      The expression Y must be one of three forms:
  361.           `(plus:M X Z)', `(minus:M X Z)', or `(plus:M X I)', where Z
  362.      is an index register and I is a constant.
  363.  
  364.      Here is an example of its use:
  365.  
  366.           (mem:SF (post_modify:SI (reg:SI 42) (plus (reg:SI 42) (reg:SI 48))))
  367.  
  368.      This says to modify pseudo register 42 by adding the contents of
  369.      pseudo register 48 to it, after the use of what ever 42 points to.
  370.  
  371. `(pre_modify:M X EXPR)'
  372.      Similar except side effects happen before the use.
  373.  
  374.    These embedded side effect expressions must be used with care.
  375. Instruction patterns may not use them.  Until the `flow' pass of the
  376. compiler, they may occur only to represent pushes onto the stack.  The
  377. `flow' pass finds cases where registers are incremented or decremented
  378. in one instruction and used as an address shortly before or after;
  379. these cases are then transformed to use pre- or post-increment or
  380. -decrement.
  381.  
  382.    If a register used as the operand of these expressions is used in
  383. another address in an insn, the original value of the register is used.
  384. Uses of the register outside of an address are not permitted within the
  385. same insn as a use in an embedded side effect expression because such
  386. insns behave differently on different machines and hence must be treated
  387. as ambiguous and disallowed.
  388.  
  389.    An instruction that can be represented with an embedded side effect
  390. could also be represented using `parallel' containing an additional
  391. `set' to describe how the address register is altered.  This is not
  392. done because machines that allow these operations at all typically
  393. allow them wherever a memory address is called for.  Describing them as
  394. additional parallel stores would require doubling the number of entries
  395. in the machine description.
  396.  
  397. 
  398. File: gcc.info,  Node: Assembler,  Next: Insns,  Prev: Incdec,  Up: RTL
  399.  
  400. Assembler Instructions as Expressions
  401. =====================================
  402.  
  403.    The RTX code `asm_operands' represents a value produced by a
  404. user-specified assembler instruction.  It is used to represent an `asm'
  405. statement with arguments.  An `asm' statement with a single output
  406. operand, like this:
  407.  
  408.      asm ("foo %1,%2,%0" : "=a" (outputvar) : "g" (x + y), "di" (*z));
  409.  
  410. is represented using a single `asm_operands' RTX which represents the
  411. value that is stored in `outputvar':
  412.  
  413.      (set RTX-FOR-OUTPUTVAR
  414.           (asm_operands "foo %1,%2,%0" "a" 0
  415.                         [RTX-FOR-ADDITION-RESULT RTX-FOR-*Z]
  416.                         [(asm_input:M1 "g")
  417.                          (asm_input:M2 "di")]))
  418.  
  419. Here the operands of the `asm_operands' RTX are the assembler template
  420. string, the output-operand's constraint, the index-number of the output
  421. operand among the output operands specified, a vector of input operand
  422. RTX's, and a vector of input-operand modes and constraints.  The mode
  423. M1 is the mode of the sum `x+y'; M2 is that of `*z'.
  424.  
  425.    When an `asm' statement has multiple output values, its insn has
  426. several such `set' RTX's inside of a `parallel'.  Each `set' contains a
  427. `asm_operands'; all of these share the same assembler template and
  428. vectors, but each contains the constraint for the respective output
  429. operand.  They are also distinguished by the output-operand index
  430. number, which is 0, 1, ... for successive output operands.
  431.  
  432. 
  433. File: gcc.info,  Node: Insns,  Next: Calls,  Prev: Assembler,  Up: RTL
  434.  
  435. Insns
  436. =====
  437.  
  438.    The RTL representation of the code for a function is a doubly-linked
  439. chain of objects called "insns".  Insns are expressions with special
  440. codes that are used for no other purpose.  Some insns are actual
  441. instructions; others represent dispatch tables for `switch' statements;
  442. others represent labels to jump to or various sorts of declarative
  443. information.
  444.  
  445.    In addition to its own specific data, each insn must have a unique
  446. id-number that distinguishes it from all other insns in the current
  447. function (after delayed branch scheduling, copies of an insn with the
  448. same id-number may be present in multiple places in a function, but
  449. these copies will always be identical and will only appear inside a
  450. `sequence'), and chain pointers to the preceding and following insns.
  451. These three fields occupy the same position in every insn, independent
  452. of the expression code of the insn.  They could be accessed with `XEXP'
  453. and `XINT', but instead three special macros are always used:
  454.  
  455. `INSN_UID (I)'
  456.      Accesses the unique id of insn I.
  457.  
  458. `PREV_INSN (I)'
  459.      Accesses the chain pointer to the insn preceding I.  If I is the
  460.      first insn, this is a null pointer.
  461.  
  462. `NEXT_INSN (I)'
  463.      Accesses the chain pointer to the insn following I.  If I is the
  464.      last insn, this is a null pointer.
  465.  
  466.    The first insn in the chain is obtained by calling `get_insns'; the
  467. last insn is the result of calling `get_last_insn'.  Within the chain
  468. delimited by these insns, the `NEXT_INSN' and `PREV_INSN' pointers must
  469. always correspond: if INSN is not the first insn,
  470.  
  471.      NEXT_INSN (PREV_INSN (INSN)) == INSN
  472.  
  473. is always true and if INSN is not the last insn,
  474.  
  475.      PREV_INSN (NEXT_INSN (INSN)) == INSN
  476.  
  477. is always true.
  478.  
  479.    After delay slot scheduling, some of the insns in the chain might be
  480. `sequence' expressions, which contain a vector of insns.  The value of
  481. `NEXT_INSN' in all but the last of these insns is the next insn in the
  482. vector; the value of `NEXT_INSN' of the last insn in the vector is the
  483. same as the value of `NEXT_INSN' for the `sequence' in which it is
  484. contained.  Similar rules apply for `PREV_INSN'.
  485.  
  486.    This means that the above invariants are not necessarily true for
  487. insns inside `sequence' expressions.  Specifically, if INSN is the
  488. first insn in a `sequence', `NEXT_INSN (PREV_INSN (INSN))' is the insn
  489. containing the `sequence' expression, as is the value of `PREV_INSN
  490. (NEXT_INSN (INSN))' is INSN is the last insn in the `sequence'
  491. expression.  You can use these expressions to find the containing
  492. `sequence' expression.
  493.  
  494.    Every insn has one of the following six expression codes:
  495.  
  496. `insn'
  497.      The expression code `insn' is used for instructions that do not
  498.      jump and do not do function calls.  `sequence' expressions are
  499.      always contained in insns with code `insn' even if one of those
  500.      insns should jump or do function calls.
  501.  
  502.      Insns with code `insn' have four additional fields beyond the three
  503.      mandatory ones listed above.  These four are described in a table
  504.      below.
  505.  
  506. `jump_insn'
  507.      The expression code `jump_insn' is used for instructions that may
  508.      jump (or, more generally, may contain `label_ref' expressions).  If
  509.      there is an instruction to return from the current function, it is
  510.      recorded as a `jump_insn'.
  511.  
  512.      `jump_insn' insns have the same extra fields as `insn' insns,
  513.      accessed in the same way and in addition contain a field
  514.      `JUMP_LABEL' which is defined once jump optimization has completed.
  515.  
  516.      For simple conditional and unconditional jumps, this field
  517.      contains the `code_label' to which this insn will (possibly
  518.      conditionally) branch.  In a more complex jump, `JUMP_LABEL'
  519.      records one of the labels that the insn refers to; the only way to
  520.      find the others is to scan the entire body of the insn.
  521.  
  522.      Return insns count as jumps, but since they do not refer to any
  523.      labels, they have zero in the `JUMP_LABEL' field.
  524.  
  525. `call_insn'
  526.      The expression code `call_insn' is used for instructions that may
  527.      do function calls.  It is important to distinguish these
  528.      instructions because they imply that certain registers and memory
  529.      locations may be altered unpredictably.
  530.  
  531.      `call_insn' insns have the same extra fields as `insn' insns,
  532.      accessed in the same way and in addition contain a field
  533.      `CALL_INSN_FUNCTION_USAGE', which contains a list (chain of
  534.      `expr_list' expressions) containing `use' and `clobber'
  535.      expressions that denote hard registers used or clobbered by the
  536.      called function.  A register specified in a `clobber' in this list
  537.      is modified *after* the execution of the `call_insn', while a
  538.      register in a `clobber' in the body of the `call_insn' is
  539.      clobbered before the insn completes execution.  `clobber'
  540.      expressions in this list augment registers specified in
  541.      `CALL_USED_REGISTERS' (*note Register Basics::.).
  542.  
  543. `code_label'
  544.      A `code_label' insn represents a label that a jump insn can jump
  545.      to.  It contains two special fields of data in addition to the
  546.      three standard ones.  `CODE_LABEL_NUMBER' is used to hold the
  547.      "label number", a number that identifies this label uniquely among
  548.      all the labels in the compilation (not just in the current
  549.      function).  Ultimately, the label is represented in the assembler
  550.      output as an assembler label, usually of the form `LN' where N is
  551.      the label number.
  552.  
  553.      When a `code_label' appears in an RTL expression, it normally
  554.      appears within a `label_ref' which represents the address of the
  555.      label, as a number.
  556.  
  557.      The field `LABEL_NUSES' is only defined once the jump optimization
  558.      phase is completed and contains the number of times this label is
  559.      referenced in the current function.
  560.  
  561. `barrier'
  562.      Barriers are placed in the instruction stream when control cannot
  563.      flow past them.  They are placed after unconditional jump
  564.      instructions to indicate that the jumps are unconditional and
  565.      after calls to `volatile' functions, which do not return (e.g.,
  566.      `exit').  They contain no information beyond the three standard
  567.      fields.
  568.  
  569. `note'
  570.      `note' insns are used to represent additional debugging and
  571.      declarative information.  They contain two nonstandard fields, an
  572.      integer which is accessed with the macro `NOTE_LINE_NUMBER' and a
  573.      string accessed with `NOTE_SOURCE_FILE'.
  574.  
  575.      If `NOTE_LINE_NUMBER' is positive, the note represents the
  576.      position of a source line and `NOTE_SOURCE_FILE' is the source
  577.      file name that the line came from.  These notes control generation
  578.      of line number data in the assembler output.
  579.  
  580.      Otherwise, `NOTE_LINE_NUMBER' is not really a line number but a
  581.      code with one of the following values (and `NOTE_SOURCE_FILE' must
  582.      contain a null pointer):
  583.  
  584.     `NOTE_INSN_DELETED'
  585.           Such a note is completely ignorable.  Some passes of the
  586.           compiler delete insns by altering them into notes of this
  587.           kind.
  588.  
  589.     `NOTE_INSN_BLOCK_BEG'
  590.     `NOTE_INSN_BLOCK_END'
  591.           These types of notes indicate the position of the beginning
  592.           and end of a level of scoping of variable names.  They
  593.           control the output of debugging information.
  594.  
  595.     `NOTE_INSN_EH_REGION_BEG'
  596.     `NOTE_INSN_EH_REGION_END'
  597.           These types of notes indicate the position of the beginning
  598.           and end of a level of scoping for exception handling.
  599.           `NOTE_BLOCK_NUMBER' identifies which `CODE_LABEL' is
  600.           associated with the given region.
  601.  
  602.     `NOTE_INSN_LOOP_BEG'
  603.     `NOTE_INSN_LOOP_END'
  604.           These types of notes indicate the position of the beginning
  605.           and end of a `while' or `for' loop.  They enable the loop
  606.           optimizer to find loops quickly.
  607.  
  608.     `NOTE_INSN_LOOP_CONT'
  609.           Appears at the place in a loop that `continue' statements
  610.           jump to.
  611.  
  612.     `NOTE_INSN_LOOP_VTOP'
  613.           This note indicates the place in a loop where the exit test
  614.           begins for those loops in which the exit test has been
  615.           duplicated.  This position becomes another virtual start of
  616.           the loop when considering loop invariants.
  617.  
  618.     `NOTE_INSN_FUNCTION_END'
  619.           Appears near the end of the function body, just before the
  620.           label that `return' statements jump to (on machine where a
  621.           single instruction does not suffice for returning).  This
  622.           note may be deleted by jump optimization.
  623.  
  624.     `NOTE_INSN_SETJMP'
  625.           Appears following each call to `setjmp' or a related function.
  626.  
  627.      These codes are printed symbolically when they appear in debugging
  628.      dumps.
  629.  
  630.    The machine mode of an insn is normally `VOIDmode', but some phases
  631. use the mode for various purposes.
  632.  
  633.    The common subexpression elimination pass sets the mode of an insn to
  634. `QImode' when it is the first insn in a block that has already been
  635. processed.
  636.  
  637.    The second Haifa scheduling pass, for targets that can multiple
  638. issue, sets the mode of an insn to `TImode' when it is believed that the
  639. instruction begins an issue group.  That is, when the instruction
  640. cannot issue simultaneously with the previous.  This may be relied on
  641. by later passes, in particular machine-dependant reorg.
  642.  
  643.    Here is a table of the extra fields of `insn', `jump_insn' and
  644. `call_insn' insns:
  645.  
  646. `PATTERN (I)'
  647.      An expression for the side effect performed by this insn.  This
  648.      must be one of the following codes: `set', `call', `use',
  649.      `clobber', `return', `asm_input', `asm_output', `addr_vec',
  650.      `addr_diff_vec', `trap_if', `unspec', `unspec_volatile',
  651.      `parallel', or `sequence'.  If it is a `parallel', each element of
  652.      the `parallel' must be one these codes, except that `parallel'
  653.      expressions cannot be nested and `addr_vec' and `addr_diff_vec'
  654.      are not permitted inside a `parallel' expression.
  655.  
  656. `INSN_CODE (I)'
  657.      An integer that says which pattern in the machine description
  658.      matches this insn, or -1 if the matching has not yet been
  659.      attempted.
  660.  
  661.      Such matching is never attempted and this field remains -1 on an
  662.      insn whose pattern consists of a single `use', `clobber',
  663.      `asm_input', `addr_vec' or `addr_diff_vec' expression.
  664.  
  665.      Matching is also never attempted on insns that result from an `asm'
  666.      statement.  These contain at least one `asm_operands' expression.
  667.      The function `asm_noperands' returns a non-negative value for such
  668.      insns.
  669.  
  670.      In the debugging output, this field is printed as a number
  671.      followed by a symbolic representation that locates the pattern in
  672.      the `md' file as some small positive or negative offset from a
  673.      named pattern.
  674.  
  675. `LOG_LINKS (I)'
  676.      A list (chain of `insn_list' expressions) giving information about
  677.      dependencies between instructions within a basic block.  Neither a
  678.      jump nor a label may come between the related insns.
  679.  
  680. `REG_NOTES (I)'
  681.      A list (chain of `expr_list' and `insn_list' expressions) giving
  682.      miscellaneous information about the insn.  It is often information
  683.      pertaining to the registers used in this insn.
  684.  
  685.    The `LOG_LINKS' field of an insn is a chain of `insn_list'
  686. expressions.  Each of these has two operands: the first is an insn, and
  687. the second is another `insn_list' expression (the next one in the
  688. chain).  The last `insn_list' in the chain has a null pointer as second
  689. operand.  The significant thing about the chain is which insns appear
  690. in it (as first operands of `insn_list' expressions).  Their order is
  691. not significant.
  692.  
  693.    This list is originally set up by the flow analysis pass; it is a
  694. null pointer until then.  Flow only adds links for those data
  695. dependencies which can be used for instruction combination.  For each
  696. insn, the flow analysis pass adds a link to insns which store into
  697. registers values that are used for the first time in this insn.  The
  698. instruction scheduling pass adds extra links so that every dependence
  699. will be represented.  Links represent data dependencies,
  700. antidependencies and output dependencies; the machine mode of the link
  701. distinguishes these three types: antidependencies have mode
  702. `REG_DEP_ANTI', output dependencies have mode `REG_DEP_OUTPUT', and
  703. data dependencies have mode `VOIDmode'.
  704.  
  705.    The `REG_NOTES' field of an insn is a chain similar to the
  706. `LOG_LINKS' field but it includes `expr_list' expressions in addition
  707. to `insn_list' expressions.  There are several kinds of register notes,
  708. which are distinguished by the machine mode, which in a register note
  709. is really understood as being an `enum reg_note'.  The first operand OP
  710. of the note is data whose meaning depends on the kind of note.
  711.  
  712.    The macro `REG_NOTE_KIND (X)' returns the kind of register note.
  713. Its counterpart, the macro `PUT_REG_NOTE_KIND (X, NEWKIND)' sets the
  714. register note type of X to be NEWKIND.
  715.  
  716.    Register notes are of three classes: They may say something about an
  717. input to an insn, they may say something about an output of an insn, or
  718. they may create a linkage between two insns.  There are also a set of
  719. values that are only used in `LOG_LINKS'.
  720.  
  721.    These register notes annotate inputs to an insn:
  722.  
  723. `REG_DEAD'
  724.      The value in OP dies in this insn; that is to say, altering the
  725.      value immediately after this insn would not affect the future
  726.      behavior of the program.
  727.  
  728.      This does not necessarily mean that the register OP has no useful
  729.      value after this insn since it may also be an output of the insn.
  730.      In such a case, however, a `REG_DEAD' note would be redundant and
  731.      is usually not present until after the reload pass, but no code
  732.      relies on this fact.
  733.  
  734. `REG_INC'
  735.      The register OP is incremented (or decremented; at this level
  736.      there is no distinction) by an embedded side effect inside this
  737.      insn.  This means it appears in a `post_inc', `pre_inc',
  738.      `post_dec' or `pre_dec' expression.
  739.  
  740. `REG_NONNEG'
  741.      The register OP is known to have a nonnegative value when this
  742.      insn is reached.  This is used so that decrement and branch until
  743.      zero instructions, such as the m68k dbra, can be matched.
  744.  
  745.      The `REG_NONNEG' note is added to insns only if the machine
  746.      description has a `decrement_and_branch_until_zero' pattern.
  747.  
  748. `REG_NO_CONFLICT'
  749.      This insn does not cause a conflict between OP and the item being
  750.      set by this insn even though it might appear that it does.  In
  751.      other words, if the destination register and OP could otherwise be
  752.      assigned the same register, this insn does not prevent that
  753.      assignment.
  754.  
  755.      Insns with this note are usually part of a block that begins with a
  756.      `clobber' insn specifying a multi-word pseudo register (which will
  757.      be the output of the block), a group of insns that each set one
  758.      word of the value and have the `REG_NO_CONFLICT' note attached,
  759.      and a final insn that copies the output to itself with an attached
  760.      `REG_EQUAL' note giving the expression being computed.  This block
  761.      is encapsulated with `REG_LIBCALL' and `REG_RETVAL' notes on the
  762.      first and last insns, respectively.
  763.  
  764. `REG_LABEL'
  765.      This insn uses OP, a `code_label', but is not a `jump_insn'.  The
  766.      presence of this note allows jump optimization to be aware that OP
  767.      is, in fact, being used.
  768.  
  769.    The following notes describe attributes of outputs of an insn:
  770.  
  771. `REG_EQUIV'
  772. `REG_EQUAL'
  773.      This note is only valid on an insn that sets only one register and
  774.      indicates that that register will be equal to OP at run time; the
  775.      scope of this equivalence differs between the two types of notes.
  776.      The value which the insn explicitly copies into the register may
  777.      look different from OP, but they will be equal at run time.  If the
  778.      output of the single `set' is a `strict_low_part' expression, the
  779.      note refers to the register that is contained in `SUBREG_REG' of
  780.      the `subreg' expression.
  781.  
  782.      For `REG_EQUIV', the register is equivalent to OP throughout the
  783.      entire function, and could validly be replaced in all its
  784.      occurrences by OP.  ("Validly" here refers to the data flow of the
  785.      program; simple replacement may make some insns invalid.)  For
  786.      example, when a constant is loaded into a register that is never
  787.      assigned any other value, this kind of note is used.
  788.  
  789.      When a parameter is copied into a pseudo-register at entry to a
  790.      function, a note of this kind records that the register is
  791.      equivalent to the stack slot where the parameter was passed.
  792.      Although in this case the register may be set by other insns, it
  793.      is still valid to replace the register by the stack slot
  794.      throughout the function.
  795.  
  796.      A `REG_EQUIV' note is also used on an instruction which copies a
  797.      register parameter into a pseudo-register at entry to a function,
  798.      if there is a stack slot where that parameter could be stored.
  799.      Although other insns may set the pseudo-register, it is valid for
  800.      the compiler to replace the pseudo-register by stack slot
  801.      throughout the function, provided the compiler ensures that the
  802.      stack slot is properly initialized by making the replacement in
  803.      the initial copy instruction as well.  This is used on machines
  804.      for which the calling convention allocates stack space for
  805.      register parameters.  See `REG_PARM_STACK_SPACE' in *Note Stack
  806.      Arguments::..
  807.  
  808.      In the case of `REG_EQUAL', the register that is set by this insn
  809.      will be equal to OP at run time at the end of this insn but not
  810.      necessarily elsewhere in the function.  In this case, OP is
  811.      typically an arithmetic expression.  For example, when a sequence
  812.      of insns such as a library call is used to perform an arithmetic
  813.      operation, this kind of note is attached to the insn that produces
  814.      or copies the final value.
  815.  
  816.      These two notes are used in different ways by the compiler passes.
  817.      `REG_EQUAL' is used by passes prior to register allocation (such as
  818.      common subexpression elimination and loop optimization) to tell
  819.      them how to think of that value.  `REG_EQUIV' notes are used by
  820.      register allocation to indicate that there is an available
  821.      substitute expression (either a constant or a `mem' expression for
  822.      the location of a parameter on the stack) that may be used in
  823.      place of a register if insufficient registers are available.
  824.  
  825.      Except for stack homes for parameters, which are indicated by a
  826.      `REG_EQUIV' note and are not useful to the early optimization
  827.      passes and pseudo registers that are equivalent to a memory
  828.      location throughout there entire life, which is not detected until
  829.      later in the compilation, all equivalences are initially indicated
  830.      by an attached `REG_EQUAL' note.  In the early stages of register
  831.      allocation, a `REG_EQUAL' note is changed into a `REG_EQUIV' note
  832.      if OP is a constant and the insn represents the only set of its
  833.      destination register.
  834.  
  835.      Thus, compiler passes prior to register allocation need only check
  836.      for `REG_EQUAL' notes and passes subsequent to register allocation
  837.      need only check for `REG_EQUIV' notes.
  838.  
  839. `REG_UNUSED'
  840.      The register OP being set by this insn will not be used in a
  841.      subsequent insn.  This differs from a `REG_DEAD' note, which
  842.      indicates that the value in an input will not be used subsequently.
  843.      These two notes are independent; both may be present for the same
  844.      register.
  845.  
  846. `REG_WAS_0'
  847.      The single output of this insn contained zero before this insn.
  848.      OP is the insn that set it to zero.  You can rely on this note if
  849.      it is present and OP has not been deleted or turned into a `note';
  850.      its absence implies nothing.
  851.  
  852.    These notes describe linkages between insns.  They occur in pairs:
  853. one insn has one of a pair of notes that points to a second insn, which
  854. has the inverse note pointing back to the first insn.
  855.  
  856. `REG_RETVAL'
  857.      This insn copies the value of a multi-insn sequence (for example, a
  858.      library call), and OP is the first insn of the sequence (for a
  859.      library call, the first insn that was generated to set up the
  860.      arguments for the library call).
  861.  
  862.      Loop optimization uses this note to treat such a sequence as a
  863.      single operation for code motion purposes and flow analysis uses
  864.      this note to delete such sequences whose results are dead.
  865.  
  866.      A `REG_EQUAL' note will also usually be attached to this insn to
  867.      provide the expression being computed by the sequence.
  868.  
  869.      These notes will be deleted after reload, since they are no longer
  870.      accurate or useful.
  871.  
  872. `REG_LIBCALL'
  873.      This is the inverse of `REG_RETVAL': it is placed on the first
  874.      insn of a multi-insn sequence, and it points to the last one.
  875.  
  876.      These notes are deleted after reload, since they are no longer
  877.      useful or accurate.
  878.  
  879. `REG_CC_SETTER'
  880. `REG_CC_USER'
  881.      On machines that use `cc0', the insns which set and use `cc0' set
  882.      and use `cc0' are adjacent.  However, when branch delay slot
  883.      filling is done, this may no longer be true.  In this case a
  884.      `REG_CC_USER' note will be placed on the insn setting `cc0' to
  885.      point to the insn using `cc0' and a `REG_CC_SETTER' note will be
  886.      placed on the insn using `cc0' to point to the insn setting `cc0'.
  887.  
  888.    These values are only used in the `LOG_LINKS' field, and indicate
  889. the type of dependency that each link represents.  Links which indicate
  890. a data dependence (a read after write dependence) do not use any code,
  891. they simply have mode `VOIDmode', and are printed without any
  892. descriptive text.
  893.  
  894. `REG_DEP_ANTI'
  895.      This indicates an anti dependence (a write after read dependence).
  896.  
  897. `REG_DEP_OUTPUT'
  898.      This indicates an output dependence (a write after write
  899.      dependence).
  900.  
  901.    These notes describe information gathered from gcov profile data.
  902. They are stored in the `REG_NOTES' field of an insn as an `expr_list'.
  903.  
  904. `REG_EXEC_COUNT'
  905.      This is used to indicate the number of times a basic block was
  906.      executed according to the profile data.  The note is attached to
  907.      the first insn in the basic block.
  908.  
  909. `REG_BR_PROB'
  910.      This is used to specify the ratio of branches to non-branches of a
  911.      branch insn according to the profile data.  The value is stored as
  912.      a value between 0 and REG_BR_PROB_BASE; larger values indicate a
  913.      higher probability that the branch will be taken.
  914.  
  915. `REG_BR_PRED'
  916.      These notes are found in JUMP insns after delayed branch scheduling
  917.      has taken place.  They indicate both the direction and the
  918.      likelyhood of the JUMP.  The format is a bitmask of ATTR_FLAG_*
  919.      values.
  920.  
  921. `REG_FRAME_RELATED_EXPR'
  922.      This is used on an RTX_FRAME_RELATED_P insn wherein the attached
  923.      expression is used in place of the actual insn pattern.  This is
  924.      done in cases where the pattern is either complex or misleading.
  925.  
  926.    For convenience, the machine mode in an `insn_list' or `expr_list'
  927. is printed using these symbolic codes in debugging dumps.
  928.  
  929.    The only difference between the expression codes `insn_list' and
  930. `expr_list' is that the first operand of an `insn_list' is assumed to
  931. be an insn and is printed in debugging dumps as the insn's unique id;
  932. the first operand of an `expr_list' is printed in the ordinary way as
  933. an expression.
  934.  
  935. 
  936. File: gcc.info,  Node: Calls,  Next: Sharing,  Prev: Insns,  Up: RTL
  937.  
  938. RTL Representation of Function-Call Insns
  939. =========================================
  940.  
  941.    Insns that call subroutines have the RTL expression code `call_insn'.
  942. These insns must satisfy special rules, and their bodies must use a
  943. special RTL expression code, `call'.
  944.  
  945.    A `call' expression has two operands, as follows:
  946.  
  947.      (call (mem:FM ADDR) NBYTES)
  948.  
  949. Here NBYTES is an operand that represents the number of bytes of
  950. argument data being passed to the subroutine, FM is a machine mode
  951. (which must equal as the definition of the `FUNCTION_MODE' macro in the
  952. machine description) and ADDR represents the address of the subroutine.
  953.  
  954.    For a subroutine that returns no value, the `call' expression as
  955. shown above is the entire body of the insn, except that the insn might
  956. also contain `use' or `clobber' expressions.
  957.  
  958.    For a subroutine that returns a value whose mode is not `BLKmode',
  959. the value is returned in a hard register.  If this register's number is
  960. R, then the body of the call insn looks like this:
  961.  
  962.      (set (reg:M R)
  963.           (call (mem:FM ADDR) NBYTES))
  964.  
  965. This RTL expression makes it clear (to the optimizer passes) that the
  966. appropriate register receives a useful value in this insn.
  967.  
  968.    When a subroutine returns a `BLKmode' value, it is handled by
  969. passing to the subroutine the address of a place to store the value.
  970. So the call insn itself does not "return" any value, and it has the
  971. same RTL form as a call that returns nothing.
  972.  
  973.    On some machines, the call instruction itself clobbers some register,
  974. for example to contain the return address.  `call_insn' insns on these
  975. machines should have a body which is a `parallel' that contains both
  976. the `call' expression and `clobber' expressions that indicate which
  977. registers are destroyed.  Similarly, if the call instruction requires
  978. some register other than the stack pointer that is not explicitly
  979. mentioned it its RTL, a `use' subexpression should mention that
  980. register.
  981.  
  982.    Functions that are called are assumed to modify all registers listed
  983. in the configuration macro `CALL_USED_REGISTERS' (*note Register
  984. Basics::.) and, with the exception of `const' functions and library
  985. calls, to modify all of memory.
  986.  
  987.    Insns containing just `use' expressions directly precede the
  988. `call_insn' insn to indicate which registers contain inputs to the
  989. function.  Similarly, if registers other than those in
  990. `CALL_USED_REGISTERS' are clobbered by the called function, insns
  991. containing a single `clobber' follow immediately after the call to
  992. indicate which registers.
  993.  
  994. 
  995. File: gcc.info,  Node: Sharing,  Next: Reading RTL,  Prev: Calls,  Up: RTL
  996.  
  997. Structure Sharing Assumptions
  998. =============================
  999.  
  1000.    The compiler assumes that certain kinds of RTL expressions are
  1001. unique; there do not exist two distinct objects representing the same
  1002. value.  In other cases, it makes an opposite assumption: that no RTL
  1003. expression object of a certain kind appears in more than one place in
  1004. the containing structure.
  1005.  
  1006.    These assumptions refer to a single function; except for the RTL
  1007. objects that describe global variables and external functions, and a
  1008. few standard objects such as small integer constants, no RTL objects
  1009. are common to two functions.
  1010.  
  1011.    * Each pseudo-register has only a single `reg' object to represent
  1012.      it, and therefore only a single machine mode.
  1013.  
  1014.    * For any symbolic label, there is only one `symbol_ref' object
  1015.      referring to it.
  1016.  
  1017.    * There is only one `const_int' expression with value 0, only one
  1018.      with value 1, and only one with value -1.  Some other integer
  1019.      values are also stored uniquely.
  1020.  
  1021.    * There is only one `pc' expression.
  1022.  
  1023.    * There is only one `cc0' expression.
  1024.  
  1025.    * There is only one `const_double' expression with value 0 for each
  1026.      floating point mode.  Likewise for values 1 and 2.
  1027.  
  1028.    * No `label_ref' or `scratch' appears in more than one place in the
  1029.      RTL structure; in other words, it is safe to do a tree-walk of all
  1030.      the insns in the function and assume that each time a `label_ref'
  1031.      or `scratch' is seen it is distinct from all others that are seen.
  1032.  
  1033.    * Only one `mem' object is normally created for each static variable
  1034.      or stack slot, so these objects are frequently shared in all the
  1035.      places they appear.  However, separate but equal objects for these
  1036.      variables are occasionally made.
  1037.  
  1038.    * When a single `asm' statement has multiple output operands, a
  1039.      distinct `asm_operands' expression is made for each output operand.
  1040.      However, these all share the vector which contains the sequence of
  1041.      input operands.  This sharing is used later on to test whether two
  1042.      `asm_operands' expressions come from the same statement, so all
  1043.      optimizations must carefully preserve the sharing if they copy the
  1044.      vector at all.
  1045.  
  1046.    * No RTL object appears in more than one place in the RTL structure
  1047.      except as described above.  Many passes of the compiler rely on
  1048.      this by assuming that they can modify RTL objects in place without
  1049.      unwanted side-effects on other insns.
  1050.  
  1051.    * During initial RTL generation, shared structure is freely
  1052.      introduced.  After all the RTL for a function has been generated,
  1053.      all shared structure is copied by `unshare_all_rtl' in
  1054.      `emit-rtl.c', after which the above rules are guaranteed to be
  1055.      followed.
  1056.  
  1057.    * During the combiner pass, shared structure within an insn can exist
  1058.      temporarily.  However, the shared structure is copied before the
  1059.      combiner is finished with the insn.  This is done by calling
  1060.      `copy_rtx_if_shared', which is a subroutine of `unshare_all_rtl'.
  1061.  
  1062. 
  1063. File: gcc.info,  Node: Reading RTL,  Prev: Sharing,  Up: RTL
  1064.  
  1065. Reading RTL
  1066. ===========
  1067.  
  1068.    To read an RTL object from a file, call `read_rtx'.  It takes one
  1069. argument, a stdio stream, and returns a single RTL object.
  1070.  
  1071.    Reading RTL from a file is very slow.  This is not currently a
  1072. problem since reading RTL occurs only as part of building the compiler.
  1073.  
  1074.    People frequently have the idea of using RTL stored as text in a
  1075. file as an interface between a language front end and the bulk of GNU
  1076. CC.  This idea is not feasible.
  1077.  
  1078.    GNU CC was designed to use RTL internally only.  Correct RTL for a
  1079. given program is very dependent on the particular target machine.  And
  1080. the RTL does not contain all the information about the program.
  1081.  
  1082.    The proper way to interface GNU CC to a new language front end is
  1083. with the "tree" data structure.  There is no manual for this data
  1084. structure, but it is described in the files `tree.h' and `tree.def'.
  1085.  
  1086.